from base.base import Base
from selenium.webdriver.common.by import By
from time import sleep
class ShouCangPage(Base):
    shoucang = (By.XPATH,'/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/androidx.drawerlayout.widget.DrawerLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.TabHost/android.widget.LinearLayout/android.widget.TabWidget/android.widget.RelativeLayout[3]/android.widget.LinearLayout/android.widget.ImageView')
    shoucangkuang =(By.ID,'com.xiachufang:id/search_edit_text')
    shoucangshuru=(By.XPATH,'//android.widget.EditText[@text="搜索我的收藏"]')
    sousuoanniu = 'new UiSelector().text("搜索")'
    dy = (By.ID,'com.xiachufang:id/common_first_text')
    dy2 = (By.ID,'com.xiachufang:id/tv_load_status_major')
    dy3 = (By.ID,'com.xiachufang:id/search_edit_text')
    def shousuoyewu(self,filee):
        self.loc_ele(self.shoucang).click()
        sleep(2)
        self.loc_ele(self.shoucangkuang).click()
        sleep(2)
        self.loc_wait_ele(self.shoucangshuru).send_keys(filee)
        sleep(2)
        self.loc_ui_ele(self.sousuoanniu).click()
